class Student:
    #Student类构造方法，设置name,gender,age三个属性
    def __init__(self, name, gender, age):
        self.姓名 = name
        self.性别 = gender
        self.年龄 = age
    def showInfo(self):
        #items()函数以列表返回可遍历的键、值
        for attr in self.__dict__.items():
            print("{0}: {1}".format(attr[0], attr[1]))
if __name__ == '__main__':
    student1 = Student("张志明","男",19)#创建Student类对象
    student1.showInfo()
    #显示类名
    print("类名:{0}".format(student1.__class__))
    print("-"*56)
    student2 = Student("李春娇","女",18)
    student2.showInfo()